<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta name="HandheldFriendly" content="True">
    <link rel="shortcut icon" href="<?php echo urldecode(Url::urlFormat("@favicon.ico"));?>"/>
    <link rel="bookmark" href="<?php echo urldecode(Url::urlFormat("@favicon.ico"));?>" />
<link href="<?php echo urldecode(Url::urlFormat("#css/bootstrap.css"));?>" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="<?php echo urldecode(Url::urlFormat("#css/common.css"));?>">
    <link rel="stylesheet" type="text/css" href="<?php echo urldecode(Url::urlFormat("#css/font-awesome.min.css"));?>">
    <link rel="stylesheet" type="text/css" href="<?php echo urldecode(Url::urlFormat("#js/artdialog/tiny-dialog.css"));?>">
 <link rel="stylesheet" type="text/css" href="<?php echo urldecode(Url::urlFormat("@static/css/font_icon.css"));?>" />
<link href="<?php echo urldecode(Url::urlFormat("#css/city-picker.css"));?>" rel="stylesheet">
<link href="<?php echo urldecode(Url::urlFormat("#css/main.css"));?>" rel="stylesheet">
   <style type="text/css">
        .swiper-container {width: 100%;}
        .js-template{display:none !important;}
    </style>
    <script src="<?php echo urldecode(Url::urlFormat("#js/jquery.min.js"));?>"></script>
    <script src="<?php echo urldecode(Url::urlFormat("#js/artdialog/dialog-plus-min.js"));?>"></script>
    <script src="<?php echo urldecode(Url::urlFormat("#js/common.js"));?>"></script>
    <script src="<?php echo urldecode(Url::urlFormat("#js/tinyslider.js"));?>"></script>
    <!-- <script src="<?php echo urldecode(Url::urlFormat("#js/bootstrap.js"));?>"></script> -->
    <script src="<?php echo urldecode(Url::urlFormat("#js/city-picker.data.js"));?>"></script>
    <script src="<?php echo urldecode(Url::urlFormat("#js/city-picker.js"));?>"></script>
    <script src="<?php echo urldecode(Url::urlFormat("#js/main.js"));?>"></script>
    <script type="text/javascript">
        var server_url = '<?php echo urldecode(Url::urlFormat("@"));?>__con__/__act__';
        var Tiny = {user:{name:'<?php echo isset($user['name'])?$user['name']:'';?>',id:'<?php echo isset($user['id'])?$user['id']:0;?>',online:<?php echo isset($user['id']) && $user['id']?'true':'false';?>}};
    </script>
    <title><?php if(isset($seo_title) && isset($site_title) && ($seo_title == $site_title)){?><?php echo isset($seo_title)?$seo_title:"";?><?php }else{?><?php echo isset($seo_title)?$seo_title:"";?>-<?php echo isset($site_title)?$site_title:"";?><?php }?></title>
</head>

<body>
    <!-- S 头部区域 -->
    <div id="header">
        <div class="topbar">
            <div class="layout-2 container">
                <div class="sub-1">
<div class="docs-methods">
    <form class="form-inline">
        <div id="distpicker">
            <div class="form-group">
                <div style="position: relative;">
                    <input id="city-picker3" class="form-control" readonly type="text" value="" data-toggle="city-picker">
                </div>
            </div>
        </div>
    </form>
</div>
                </div>
                <div class="sub-2">
                    <ul class="nav-x">
                        <!-- 
                        <li class="item down">
                            <a href="<?php echo urldecode(Url::urlFormat("/ucenter"));?>">会员中心<i class="fa">&#xf107;</i></a>
                            <div class="dropdown user-box">
                                <?php $sidebar_nav = array('我的订单'=>'order', '我的关注'=>'attention', '商品咨询'=>'consult', '商品评价'=>'review', '我的消息'=>'message', '收货地址'=>'address', '我的优惠券'=>'voucher', '账户金额'=>'account');?>
                                <ul class="user-center">
                                    <?php foreach($sidebar_nav as $key => $item){?>
                                    <li class="link"><a href="<?php echo urldecode(Url::urlFormat("/ucenter/$item"));?>"><?php echo isset($key)?$key:"";?></a></li>
                                    <?php }?>
                                </ul>
                            </div>
                        </li>
                        <li class="item split"></li>
                        <li class="item down"><a href="">APP下载</a>
                            <div class="dropdown">
                                <img src="">
                            </div>
                        </li>
                        <li class="item split"></li>
                        <li class="item"><a href="<?php echo urldecode(Url::urlFormat("/ucenter/order"));?>">我的订单</a></li>
                        -->
                        <li class="item split"></li>
                        <?php if($user){?>
                        <li class="item"><?php if(isset($user['name'])){?>你好:<a href="<?php echo urldecode(Url::urlFormat("/ucenter/index"));?>"><?php echo isset($user['name'])?$user['name']:"";?></a>
                        进入 <a href="<?php echo urldecode(Url::urlFormat("/ucenter/index"));?>" style="color:red;">个人中心</a>
                         - <?php }?><a href="<?php echo urldecode(Url::urlFormat("/simple/logout"));?>">安全退出</a></li>
                        <?php }else{?>
                        <li class="item"><a class="normal" href="<?php echo urldecode(Url::urlFormat("/simple/login"));?>">登录</a>/<a class="normal" href="<?php echo urldecode(Url::urlFormat("/simple/reg"));?>">注册</a></li>
                        <?php }?>
                        <li class="item"><a target="_blank" class="normal" href="<?php echo urldecode(Url::urlFormat("/simple/cart"));?>">购物车</a></li>
                    </ul>
                </div>
                
            </div>
        </div>
        <div class="container head-main">
            <!-- <div class="sub-1 logo"></div> -->
            <div class="sub-1">
            <a href="<?php echo urldecode(Url::urlFormat("/index/index"));?>"><img src="<?php echo urldecode(Url::urlFormat("@$site_logo"));?>" style="margin-top:20px;"></a></div>
            <div class="sub-2">
                <form id="search-form" class="search-form" action="<?php echo urldecode(Url::urlFormat("/"));?>" method="get">
                    <input type="hidden" name="con" value="index">
                    <input type="hidden" name="act" value="search">
                    <input type='hidden' name='tiny_token_' value='<?php echo Tiny::app()->getToken("");?>'/>
                    <input class="search-keyword" id="search-keyword" class="txt-keyword" name="keyword" value="" type="text">
                    <button class="btn-search ">搜索</button>
					<!-- 
                    <p id="tags-list"><?php $item=null; $query = new Query("tags");$query->order = "is_hot desc,sort desc,num desc";$query->limit = "3";$items = $query->find(); foreach($items as $key => $item){?><a href="#"><?php echo isset($item['name'])?$item['name']:"";?></a><?php }?></p>
                    -->
                </form>
            </div>
            <!-- 
            <div class="sub-3">
                <div class="shopping" id="shopping-cart"><i class="icon-cart-32"></i>购物车
                    <div class="dropdown">
                        <ul class="cart-box " id="cart-list">
                            <?php $total=0.00;?><?php if($cart){?><?php foreach($cart as $key => $item){?> <?php $total += $item['amount'];?>
                            <li class="cart-item" id="<?php echo isset($item['id'])?$item['id']:"";?>">
                                <div class="pic">
                                    <a class="card-pic" href="<?php echo urldecode(Url::urlFormat("/index/product/id/$item[goods_id]"));?>" target="_blank" title="<?php echo isset($item['name'])?$item['name']:"";?>"><img src="<?php echo urldecode(Url::urlFormat("@$item[img]"));?>" width="50" height="50"></a>
                                </div>
                                <div class="spec">
                                    <?php foreach($item['spec'] as $key => $spec){?>
                                    <p title="<?php echo isset($spec['name'])?$spec['name']:"";?>:<?php echo isset($spec['value'][2])?$spec['value'][2]:"";?>"><?php echo isset($spec['value'][2])?$spec['value'][2]:"";?></p>
                                    <?php }?>
                                </div>
                                <div class="num"><?php echo isset($item['num'])?$item['num']:"";?></div>
                                <div class="price" title="<?php echo isset($item['amount'])?$item['amount']:"";?>"><?php echo isset($item['amount'])?$item['amount']:"";?></div>
                                <a class="icon-close-16 ie6png" productid="<?php echo isset($item['id'])?$item['id']:"";?>"></a>
                            </li>
                            <?php }?>
                            <?php }else{?>
                            <li><div>购物车中还没有商品，赶紧选购吧！</div></li>
                            <?php }?>

                        </ul>
                        <div class="cart-count">
                            <span>合计：</span><span class="cart-total"><?php echo isset($total)?$total:"";?></span>
                            <a href="<?php echo urldecode(Url::urlFormat("/simple/cart"));?>" class="btn btn-main">去购物车结算</a>
                        </div>
                    </div>
                </div>
            </div>
            -->
        </div>
        <!-- S 导航栏 -->
        <div class="nav">
            <ul class="container">
                <li class="category-box">
                    <div class="link">
                    <a href="javascript:;" style="color: #fff;">全部分类<i class="triangle-b"></i></a>
                    </div>
                    <ul class="category">
                        <?php $current_category_ids='';$parent_category='';?>
                        <?php foreach($category as $key => $categ){?>
                        <li><a>
                            <?php if(isset($categ['id'])){?>
                            <?php $current_category_ids=$categ['id'].',';$parent_category=$categ['id'];?>
                            <?php }?> <?php echo isset($categ['title'])?$categ['title']:"";?><i class="fa">&#xf105;</i></a>
                            <div class="category-sub">
                                <ul class="sub">
                                    <?php foreach($categ['child'] as $key => $child){?>
                                    <li>
                                        <h5><a href="<?php echo urldecode(Url::urlFormat("/index/category/cid/$child[id]"));?>">
                                            <?php if(isset($child['id'])){?>
                                            <?php $current_category_ids.=$child['id'].',';?>
                                            <?php }?>
                                            <?php echo isset($child['title'])?$child['title']:"";?></a></h5>
                                            <p>
                                                <?php if(isset($child['child'])){?>
                                                <?php foreach($child['child'] as $key => $grandson){?>
                                                <a href="<?php echo urldecode(Url::urlFormat("/index/category/cid/$grandson[id]"));?>">
                                                    <?php if(isset($grandson['id'])){?>
                                                    <?php $current_category_ids.=$grandson['id'].',';?><?php }?>
                                                    <?php echo isset($grandson['title'])?$grandson['title']:"";?></a>
                                                    <?php }?>
                                                    <?php }?>
                                                </p>
                                            </li>
                                            <?php }?>
                                        </ul>
                                    </div>
                                </li>
                                <?php }?>
                            </ul>
                        </li>
                        <li class="link"><a href="<?php echo urldecode(Url::urlFormat("/index/index/flag/0"));?>">首页</a></li>
                         
                        <li class="link"><a href="<?php echo urldecode(Url::urlFormat("/index/index/condition_g_s/point/flag/1"));?>">购物积分专区</a></li>
                        <li class="link"><a href="<?php echo urldecode(Url::urlFormat("/index/index/flag/2"));?>">重消积分专区</a></li>
                        
                        <?php $item=null; $query = new Query("nav");$query->where = "type = 'main' and enable = 1";$query->order = "`sort` desc";$items = $query->find(); foreach($items as $key => $item){?>
                        <li class="link"><a href="<?php if(strstr($item['link'],'http://')===false){?><?php echo urldecode(Url::urlFormat("$item[link]"));?><?php }else{?><?php echo isset($item['link'])?$item['link']:"";?><?php }?>" target="<?php if($item['open_type']==1){?>_blank<?php }else{?>_self<?php }?>"><?php echo isset($item['name'])?$item['name']:"";?></a></li>
                        <?php }?>
                    </ul>
                </div>
                <!-- E 导航栏 -->
            </div>
            <!-- E 头部区域 -->
            <!-- S 主控区域 -->
            <div id="main">
               <link type="text/css" rel="stylesheet" href="<?php echo urldecode(Url::urlFormat("#css/ucenter.css"));?>" />
<div class="container clearfix">
	<div id='widget_sub_navs'><?php $widget = Widget::createWidget('sub_navs');$widget->action = "ucsidebar";$widget->sidebar = $sidebar;$widget->act = $actionId;$widget->cache = "false";$widget->run();?></div>
	<div class="uc-content">
		<h1 class="title"><span>我的订单：</span></h1>
		<div class="box list-item order-status">
			<div class="title"><b>订单号：</b><i class="icon-order-<?php echo isset($order['type'])?$order['type']:"";?>-32"></i><?php echo isset($order['order_no'])?$order['order_no']:"";?><b>下单日期：</b><?php echo isset($order['create_time'])?$order['create_time']:"";?> <b>状态：</b>
				<?php echo $this->order_status($order);?></div>
				<p><?php echo isset($order['create_time'])?$order['create_time']:"";?>&nbsp;&nbsp;<span class="black">订单创建</span></p>
				<?php if($order['pay_status']>0){?>
				<p><?php echo isset($order['pay_time'])?$order['pay_time']:"";?>&nbsp;&nbsp;<span class="black">订单<?php echo isset($order['order_no'])?$order['order_no']:"";?> 付款 <?php echo isset($currency_symbol)?$currency_symbol:"";?><b><?php echo isset($order['order_amount'])?$order['order_amount']:"";?></b></span></p>
				<?php }?>
				<?php if($order['status']>=3){?>
				<p><span class="black">订单<?php echo isset($order['order_no'])?$order['order_no']:"";?> 已审核通过！</span></p>
				<?php }?>
				<?php if($order['delivery_status']>0){?>
				<p><?php echo isset($order['send_time'])?$order['send_time']:"";?>&nbsp;&nbsp;<span class="black">订单<b class="orange">全部商品</b>已发货</span></p>
				<?php }?>
				<?php if($order['status']==4){?>
				<p><?php echo isset($order['completion_time'])?$order['completion_time']:"";?>&nbsp;&nbsp;<span class="black">订单完成</span></p>
				<?php }?>
			</div>
			<div>
				<table class="simple form">
					<tr>
						<th class="tl" style="padding-left: 20px;" colspan=2>收货人信息：</th>
					</tr>
					<tr><td class="label">收货人：</td><td><?php echo isset($order['accept_name'])?$order['accept_name']:"";?></td></tr>
					<tr><td class="label">地&nbsp;&nbsp;&nbsp;&nbsp;址：</td><td><?php echo isset($parse_area[$order['province']])?$parse_area[$order['province']]:"";?> <?php echo isset($parse_area[$order['city']])?$parse_area[$order['city']]:"";?> <?php echo isset($parse_area[$order['county']])?$parse_area[$order['county']]:"";?> <?php echo isset($order['addr'])?$order['addr']:"";?></td></tr>
					<tr><td class="label">电&nbsp;&nbsp;&nbsp;&nbsp;话：</td><td><?php echo isset($order['phone'])?$order['phone']:"";?></td></tr>
					<tr><td class="label">手&nbsp;&nbsp;&nbsp;&nbsp;机：</td><td><?php echo isset($order['mobile'])?$order['mobile']:"";?></td></tr>
				</table>
			</div>
			<div>
				<table class="simple form">
					<tr>
						<th class="tl" style="padding-left: 20px;" colspan=2>支付及配送方式：</th>
					</tr>
					<tr><td class="label">支付方式：</td><td><?php echo isset($order['pay_name'])?$order['pay_name']:"";?></td></tr>
					<tr><td class="label">运&nbsp;&nbsp;&nbsp;&nbsp;费：</td><td><?php echo isset($order['real_freight'])?$order['real_freight']:"";?></td></tr>
					<?php if($order['delivery_status']>0){?>
					<tr><td class="label">物流公司：</td><td><?php echo isset($invoice['ec_name'])?$invoice['ec_name']:"";?></td></tr>
					<tr><td class="label">快递单号：</td><td><?php echo isset($invoice['express_no'])?$invoice['express_no']:"";?>&nbsp;&nbsp;&nbsp;&nbsp;<a class="btn btn-mini" href="http://www.kuaidi100.com/chaxun?com=<?php echo isset($invoice['ec_code'])?$invoice['ec_code']:"";?>&nu=<?php echo isset($invoice['express_no'])?$invoice['express_no']:"";?>" target="_blank">查询物流</a>
					</td></tr>
					<?php }?>
				</table>
			</div>
			<?php if($order['is_invoice']==1){?>
			<?php $invoice = explode(':',$order['invoice_title']);?>
			<div>
				<table class="simple form">
					<tr>
						<th class="tl" style="padding-left: 20px;" colspan=2>索要发票信息：</th>
					</tr>
					<tr><td class="label">发票类型：</td><td><?php if($invoice[0]==1){?>单位<?php }else{?>个人<?php }?></td></tr>
					<tr><td class="label">发票抬头：</td><td><?php echo isset($invoice[1])?$invoice[1]:"";?></td></tr>
				</table>
			</div>
			<?php }?>
			<div>
				<h2 class="mt20">购物清单</h2>
				<table class="simple">
					<tr>
						<th width="40"></th><th>商品名称</th><th width="140">商品编号</th><th width="100">规格</th><th width="80">商品价格</th> <th width="80">优惠后价格</th> <th width="40">数量</th> <th width="80">小计</th>
					</tr>
					<?php $total=0.00;$subtotal=0.00;?>
					<?php foreach($order_goods as $key => $item){?>
					<?php $subtotal = ($item['real_price']*$item['goods_nums']);$total+=$subtotal; $subtotal = sprintf ("%01.2f",$subtotal);?>
					<tr class="<?php if($key%2==1){?>even<?php }else{?>odd<?php }?>"><td><a href="<?php echo urldecode(Url::urlFormat("/index/product/id/$item[goods_id]"));?>" target="_blank"><img src="<?php echo Common::thumb($item['img'],100,100);?>" width="40"></a></td><td><a href="<?php echo urldecode(Url::urlFormat("/index/product/id/$item[goods_id]"));?>" target="_blank"><?php echo isset($item['name'])?$item['name']:"";?></a>
					</td><td><?php echo isset($item['pro_no'])?$item['pro_no']:"";?></td> <td> <?php $specs = unserialize($item['spec']);?>
					<?php if(!empty($specs)){?>
					<?php foreach($specs as $key => $spec){?>
					<?php echo isset($spec['name'])?$spec['name']:"";?>：<?php echo isset($spec['value'][2])?$spec['value'][2]:"";?>
					<?php }?>
					<?php }?></td><td><?php echo isset($currency_symbol)?$currency_symbol:"";?><?php echo isset($item['goods_price'])?$item['goods_price']:"";?></td> <td><?php echo isset($currency_symbol)?$currency_symbol:"";?><?php echo isset($item['real_price'])?$item['real_price']:"";?></td> <td><?php echo isset($item['goods_nums'])?$item['goods_nums']:"";?></td> <td><?php echo isset($currency_symbol)?$currency_symbol:"";?><?php echo isset($subtotal)?$subtotal:"";?></td></tr>
					<?php }?>
				</table>
			</div>
			<?php $total = sprintf ("%01.2f",$total);?>
			<div class="box p10 tr order-total">
				<div class="pb10">
					<?php if($order['type']==3){?>
					<p>套餐总金额：<?php echo isset($currency_symbol)?$currency_symbol:"";?><?php echo isset($order['real_amount'])?$order['real_amount']:"";?></p>
					<?php }else{?>
					<p>商品总金额：<?php echo isset($currency_symbol)?$currency_symbol:"";?><?php echo isset($total)?$total:"";?></p>
					<?php }?>
					<p>+ 运费：<?php echo isset($currency_symbol)?$currency_symbol:"";?><?php echo isset($order['real_freight'])?$order['real_freight']:"";?></p>
					<?php if($order['taxes']>0){?>
					<p>+ 税：<?php echo isset($currency_symbol)?$currency_symbol:"";?><?php echo isset($order['taxes'])?$order['taxes']:"";?></p>
					<?php }?>
					<p>- 优惠：<?php echo isset($currency_symbol)?$currency_symbol:"";?><?php echo isset($order['discount_amount'])?$order['discount_amount']:"";?></p>
					<?php if($order['adjust_amount']!=0){?>
					<p><?php if($order['adjust_amount']>0){?>+<?php }else{?>-<?php }?> 价格调整：<?php echo isset($currency_symbol)?$currency_symbol:"";?><?php echo trim($order['adjust_amount'],'-');?></p>
					<p>调价原因：<?php echo isset($order['adjust_note'])?$order['adjust_note']:'无原因';?></p>
					<?php }?>
				</div>
				<div class="t-line pt10 total">
					订单支付金额：<b><?php echo isset($currency_symbol)?$currency_symbol:"";?><?php echo isset($order['order_amount'])?$order['order_amount']:"";?></b>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		function order_sign(id) {
			$.post("<?php echo urldecode(Url::urlFormat("/ucenter/order_sign"));?>",{id:id},function(data){
				if(data['status']=='success'){
					location.reload();
				}
			},'json');
		}
	</script>

           </div>
           <!-- E 主控区域 -->

           <!-- S 底部区域 -->
           
           <div id="footer">
            <div class="promise">
                <div class="clearfix container">
                    <dl>
                        <dt class="icon-1"></dt>
                        <dd>
                            <p class="title">诚信交易</p>
                            <p>所有产品均出正规渠道采购</p>
                        </dd>
                    </dl>
                    <dl>
                        <dt class="icon-2"></dt>
                        <dd>
                            <p class="title">60元包邮</p>
                            <p>全国各地，满60元快递包邮</p>
                        </dd>
                    </dl>
                    <dl>
                        <dt class="icon-3"></dt>
                        <dd>
                            <p class="title">极速更新</p>
                            <p>所有商品信息及时更新</p>
                        </dd>
                    </dl>
                    <dl>
                        <dt class="icon-4"></dt>
                        <dd>
                            <p class="title">7天退换货</p>
                            <p>会员享受7天无理由退换货</p>
                        </dd>
                    </dl>
                    <dl>
                        <dt class="icon-5"></dt>
                        <dd>
                            <p class="title">真实拍摄</p>
                            <p>100%真实拍摄，杜绝虚假</p>
                        </dd>
                    </dl>
                </div>
            </div>
            <div class="helps clearfix container">
                <?php $item=null; $query = new Query("help_category");$query->order = "sort desc";$query->limit = "5";$items = $query->find(); foreach($items as $key => $item){?>
                <dl >
                    <dt class="clearfix"><span class="icon-<?php echo isset($item['alias'])?$item['alias']:"";?> fl"></span><a href="javascript:;"><?php echo isset($item['name'])?$item['name']:"";?></a></dt>
                    <?php $help=null; $query = new Query("help");$query->where = "category_id = $item[id]";$query->item = "$help";$query->cache = "true";$query->cacheTime = "1200";$items = $query->find(); foreach($items as $key => $help){?>
                    <dd><a href="<?php echo urldecode(Url::urlFormat("/index/help/id/$help[id]"));?>"><?php echo isset($help['title'])?$help['title']:"";?></a></dd>
                    <?php }?>
                </dl>
                <?php }?>
                <div class="col-contact">
                    <p class="phone">0564-3336121</p>
                    <p>周一至周日 8:00-18:00
                        <br>（仅收市话费）</p>
                        <a class="btn btn-main">24小时在线客服</a>
                    </div>
                </div>
                <div class="copyright">
                    <div class="container bootom">
                        <div class="sub-1">
                        	<!-- 
                            <div class="logo"></div>
                            -->
                        </div>
                        
                        <div class="sub-2">
                        	<!-- 
                            <div><?php $item=null; $query = new Query("nav");$query->where = "type = 'bottom'";$query->order = "`sort` desc";$items = $query->find(); foreach($items as $key => $item){?>
                                <a href="<?php if(strstr($item['link'],'http://')===false){?><?php echo urldecode(Url::urlFormat("$item[link]"));?><?php }else{?><?php echo isset($item['link'])?$item['link']:"";?><?php }?>" target="<?php if($item['open_type']==1){?>_blank<?php }else{?>_self<?php }?>"><?php echo isset($item['name'])?$item['name']:"";?></a>
                                <?php }?></div>
                                -->
                                <!-- 
                                <span>Powered by <a href="#"><b style="color: #e74503"><?php echo isset($site_title)?$site_title:"";?></b></a> © 201-</span></div>
                                -->
                                <div class="sub-3">
                                    <a target="_blank" href="#"><img src="<?php echo urldecode(Url::urlFormat("#images/v-logo-2.png"));?>" alt="诚信网站"></a>
                                    <a target="_blank" href="#"><img src="<?php echo urldecode(Url::urlFormat("#images/v-logo-1.png"));?>" alt="诚信网站"></a>
                                    <a target="_blank" href="#"><img src="<?php echo urldecode(Url::urlFormat("#images/v-logo-3.png"));?>" alt="网上交易保障中心"></a>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <!-- E 底部区域 -->
                    <script>
                        $(".slider").Slider();
                        $(".category li").mouseenter(function() {
                            $(this).addClass("hover");
                        }).mouseleave(function() {
                            $(this).removeClass("hover");
                        });

                        $("#tags-list a").each(function(){
                            $(this).on("click",function(){
                                $("#search-keyword").val($(this).text());
                                $("#search-form").submit();
                            })
                        });
                        $(".category-box").mouseenter(function(){
                            $(this).addClass("on");
                        }).mouseleave(function(){
                            $(this).removeClass("on");
                        });

                        function updateCart(data){
                            var card_items = '';
                            for(var i in data){
                                var spec = data[i]['spec'];
                                var spec_str = '';
                                for(var k in spec){
                                    spec_str +="<p>"+spec[k]['value'][2]+"</p>";
                                }
                                card_items += '<div class="cart-item" id="'+i+'"><div class="pic"><img src="<?php echo urldecode(Url::urlFormat("@"));?>'+data[i]['img']+'" width="50" height="50"></div><div class="spec">'+spec_str+'</div><div class="num">'+data[i]['num']+'</div><div class="price">'+(data[i]['amount'])+'</div><a class="icon-close-16 ie6png" productid="'+data[i]['id']+'"></a></div>';
                            }
                            $("#cart-list").empty().append(card_items);
                            changeCartInfo();
                            bindDelEvent();
                        }
                        bindDelEvent();
                        function bindDelEvent(){
                            $("#shopping-cart .icon-close-16").on("click",function(){
                                var btn_close = $(this);
                                $.post("<?php echo urldecode(Url::urlFormat("/index/cart_del"));?>",{id:btn_close.attr("productid")},function(){
                                    btn_close.parent().remove();
                                    changeCartInfo();
                                    $("#card-wrap").css({top:1-$("#card-wrap").outerHeight()},"fast");
                                },"json");
                            });
                        }

                        function changeCartInfo(){
                            $(".cart-product-num").text($(".cart-item").size());
                            var total = 0.00;
                            $(".cart-item .price").each(function(){
                                total += parseFloat($(this).text());
                            });
                            $(".cart-total").text(total.toFixed(2));
                            if($(".cart-item").size()==0){
                                $("#cart-list").empty().append('<li><div>购物车中还没有商品，赶紧选购吧！</div></li>');
                            }
                        }
                        $("#tags-list a").each(function(){
                            $(this).on("click",function(){
                                $("#search-keyword").val($(this).text());
                                $("#search-form").submit();
                            })
                        });
                        
                        
                        
                        /**
                        *左侧菜单栏的关闭和打开
                        */
                        $(function(){
                        	/*
                        	$("div[class='box'] h2").toggle(function(){
                        		$(this).next("ul").hide('2000');
                        	},function(){
                        		$(this).next("ul").show('2000');
                        	});
                        	*/
                        	
                        	$("div[class='box'] h2").click(function(){
                        		//$(this).next("ul").hide('2000');
                        		var $ul = $(this).next("ul");
                        		if($ul.is(':visible'))
                        		{
                        			$ul.hide("2000");
                        		}
                        		else
                        		{
                        			$ul.show("2000");	
                        		}
                        		
                        	});
                        	
                        	
                        });
                        
                        
                    </script>
                </body>
                </html>

<!--Powered by TinyRise-->